<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:cc="http://java.sun.com/jsf/composite"
	xmlns:i="http://isifaces.org/ui">
	<h:head>
		<ui:define name="titre">Mock Drive</ui:define>
	</h:head>
   
    <h:body>
   	    <ui:composition template="../template/template.xhtml">
            <ui:define name="top">
            </ui:define>

            <ui:define name="left">
                <h:form id="form" prependId="false">  
					    <p:tree value="#{directoriesTreeBean.root}" var="node" dynamic="true" cache="true" id="tree"
					    selectionMode="single"   selection="#{directoriesTreeBean.selectedNode}">
					            <p:ajax event="select" update=":centerContent:filesForm:filesTable" listener="#{filesListBean.onNodeSelect}" />  
					        <p:treeNode>  
					            <h:outputText value="#{node.name}"/>  
					        </p:treeNode>  
					    </p:tree>  
				</h:form>  			    
	        </ui:define>

            <ui:define name="content">
                <h:form id="filesForm" prependId="false">  
                	<ui:include src="menu.xhtml"></ui:include>
    				<p:dataTable id="filesTable" var="file" value="#{filesListBean.filesList}">  
				        <p:column headerText="Name" resizable="false" sortBy="#{file.name}" width="150">  
				            <h:outputText value="#{file.name}" /> 
				        </p:column>  
				  
				        <p:column headerText="Size" resizable="false" sortBy="#{file.size}" width="50">  
				            <h:outputText value="#{file.size} KB" />  
				        </p:column>  
				  
				        <p:column headerText="Type" resizable="false" sortBy="#{file.type}" width="50">  
				            <h:outputText value="#{file.type}" />  
				        </p:column>  
				  
				        <p:column headerText="Last Modified" resizable="false" sortBy="#{file.lastModified}">  
				            <h:outputText value="#{file.lastModified}" />  
				        </p:column>  
				    </p:dataTable>  
				</h:form>  
            </ui:define>
        	
        	<ui:define name="right" border="1">
        		<h:form id="directoryDetailsForm" prependId="false">
	        	</h:form>
        	</ui:define>
        		
        </ui:composition>
    </h:body>
</html>